﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Globalization;
using System.Threading;

namespace IDE_week2_Forms_project
{
    public partial class Form1 : Form
    {
        private void ChangeLanguage(string lang)
        {
            foreach (Control c in this.Controls)
            {
                ComponentResourceManager resources =
                new ComponentResourceManager(typeof(Form1));
                resources.ApplyResources(c, c.Name, new CultureInfo(lang));
            }
        }
        public Form1()
        {
            InitializeComponent();          
            oldicon = this.Icon;
        }

        Icon oldicon;

        private void btnNewForm_Click(object sender, EventArgs e)
        {
            Form Form2 = new Form2();
            Form2.Show(); 
        }

        private void btnChangeIcon_Click(object sender, EventArgs e)
        {
            this.Icon = Properties.Resources.Icon1;
        }

        private void btnResetIcon_Click(object sender, EventArgs e)
        {
            this.Icon = oldicon;

        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void btnLanguage_Click(object sender, EventArgs e)
        {
            ChangeLanguage("da");
        }

        private void click();

        private void btnCallClass_Click(object sender, EventArgs e)
        {
        
        }

        private void label1_Click(object sender, EventArgs e)
        {
            int[] numbers = new int[10];
            Class1.MakeRandomNumber(numbers);
            label1.Text = numbers[0] + ", " + numbers[1] + ", " + numbers[2];
 
        }
            
        //    bool click = true;
        //    if (click)

        //        click1();

        //    else
        //        click2();
        //    click = !click;
        //}
        //private void click1()
        //{
        //    ChangeLanguage("da-DA");
        //}

        //private void click2()
        //{
        //    ChangeLanguage("en-GB");
        //}
    }
}
